﻿using System;
using System.IO;
using System.Management;

namespace EzDeploy_Control
{
	public class Tools
	{
		public Tools()
		{
			// Insert code required on object creation below this point.
		}
		
		public static string Detect3264()
		{
			ConnectionOptions oConn = new ConnectionOptions();
			System.Management.ManagementScope oMs = new System.Management.ManagementScope("\\\\localhost", oConn);
			System.Management.ObjectQuery oQuery = new System.Management.ObjectQuery("select AddressWidth from Win32_Processor");
			ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMs, oQuery);
			ManagementObjectCollection oReturnCollection = oSearcher.Get();
			string addressWidth = null;

			foreach (ManagementObject oReturn in oReturnCollection)
			{
				addressWidth = oReturn["AddressWidth"].ToString();
			}

			return addressWidth;
		}

	}
}